﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            double[] arr = new double[5];
            arr[0] = 100;
            arr[1] = 90;
            arr[2] = 80;
            arr[3] = 60;
            arr[4] = 60;
            double sum = 0;
            double pj = 0;

            Console.Write("五位学生成绩：");
            for (int i = 0; i < arr.Length; i++)
            {
                Console.Write(arr[i]+"");
            }
            Console.WriteLine();
            foreach (double item in arr)
            {
                sum = sum + item;
            }
            Console.WriteLine("总成绩是"+sum);
            pj = sum / 5;
            Console.WriteLine("平均成绩是"+pj);
            Console.ReadKey();
        }
    }
}
